import { createSubpageComponent } from "../page.component";

import "./input-validate.directive";
import "./form.validate";

import { AuiDate } from "../date/date.component";
AuiDate.install();

import { AuiYear } from "../date/year.component";
AuiYear.install();

import { AuiMonth } from "../date/month.component";
AuiMonth.install();

import { AuiDatepicker } from "../date/datepicker.component";
AuiDatepicker.install();

import { AuiInputDaterange } from "./input-daterange.component";
AuiInputDaterange.install();

import { AUISelect } from "./select.component";
AUISelect.install();

import { UIExampleUserInfoForm } from "./demos/user-info.form";
window.AUICustomComponents.define("ui-example-user-info-form", UIExampleUserInfoForm);

import { UIExampleOtherForm } from "./demos/other.form";
window.AUICustomComponents.define("ui-example-other-form", UIExampleOtherForm);

export class UIExampleForm extends window.AUI.app.BaseComponent {
    constructor(name) {
        super(name);
    }
    _template() {
        var self = this;
        return `<div class="${self._name}">
<ui-example-user-info-form></ui-example-user-info-form> 
<ui-example-other-form></ui-example-other-form>
</div>`;
    }
}

window.AUICustomComponents.define("ui-example-form", UIExampleForm);

export default createSubpageComponent(
    `<ui-example-form></ui-example-form>`
);